package com.Database;
import java.sql.*;
public class conDB 
{
	private Connection conn;
	public int connectDB()
	{
		try
		{
			String host = "localhost:3308";
			String database = "test";
			String user = "YOUR_USER";
			String password="YOUR_PASSWORD";
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			conn =  DriverManager.getConnection("jdbc:mysql://"+host+"/"+database+"?user="+user+"&password="+password);
			System.out.println("OK");
			return 1;
		}catch(Exception e)
		{
		    e.printStackTrace();
			return -1;
		}
	}
	
	public Connection getConnection()
	{
		return this.conn;
	}
}
